package org.space.galaxyCabinet.domain;

import com.influxdb.annotations.Column;
import com.influxdb.annotations.Measurement;
import lombok.Data;

import java.time.Instant;

@Data
@Measurement(name = "cabinet")
public class DeviceStatus {

    private Long deviceId; // 设备ID

    @Column(name = "deviceNo", tag = true)  // 关键修改：标记为Tag
    private String deviceNo; // 设备编号

    @Column(name = "humidity")
    private Float humidity; // 湿度

    @Column(name = "temperature")
    private Float temperature; // 温度

    @Column(name = "status")
    private Integer status;

    @Column(name = "time", timestamp = true)
    private Instant timestamp;
}
